#ifndef CPLAYER_H_
#define CPLAYER_H_
#include "CBase.h"
#include "CShape.h"
#include "CTextureManager.h"

 
class CPlayerBaseState;
class CCloud;
class CSGD_DirectInput;

enum PlayerInput { WALK_LEFT = 1, WALK_RIGHT = 2, JUMP = 4, CLOUD_UP = 8, CLOUD_DOWN = 16 };
enum TimePeriods { GREEK, MIDEVIL, GOTHIC, NUM_TIME_PERIODS };

class CPlayer : public CBase
{
private:

	void AdjustCamera(float fElapsed);

public:
	float				WORLD_RADIUS;
	CCloud				*m_pCloud;
	float				m_fPreviousTheta;
	CShape				m_QUAD;

	unsigned short		m_Input;
	unsigned int		m_unTimePeriod;
	float				m_fWalkSpeed;
	float				m_fJumpSpeed;
	float				m_fRadius;

	bool				m_bFlipped;
	bool				m_bFalling;

	CSGD_DirectInput	*m_pDI;
	CPlayerBaseState	*m_pCurrState;
	bool				m_bHasSwitched;

	CPlayer(); 

	void Update(float fElapsed);
	void Render();

	bool CheckCollision(CBase *pBase);

	void ChangeState(CPlayerBaseState *pState);

	void OnLostDevice(void);
};

#endif